<template>
  <div class="content">
     <statistical-view :options="query"/>
  </div>
</template>

<script>


import StatisticalView from "./components/statisticalView";
export default {
  name: "viruslSearch",
  components: {StatisticalView},
  props: {},
  data() {
    return {
      query: {
        pageSize: 10,
        pageNum: 1,
        keyword: null,
        virusSpecies: null,
        viralGroup: null,
        viralFamily: null,
        host: null,
        rnaType: null,
        abbreviation: null
      },
    }
  },
  created() {
    this.setParams()
  },
  watch: {
    $route(to) {
      this.setParams()
    }
  },
  mounted() {
  },
  methods: {
    setParams() {
      this.query.keyword = this.$route.query.keyword
      this.query.virusSpecies = this.$route.query.virusSpecies
      this.query.viralGroup = this.$route.query.viralGroup
      this.query.viralFamily = this.$route.query.viralFamily
      this.query.host = this.$route.query.host
      this.query.rnaType = this.$route.query.rnaType
      this.query.abbreviation = this.$route.query.abbreviation
    },

  }
}
</script>

<style lang="stylus" scoped>
.content {
  width 1170px
  margin 0 auto
  margin-top 60px
  margin-bottom 60px
}
</style>
